package com.dikang.yygh.task.schedule;

import com.dikang.yygh.common.constant.MqConst;
import com.dikang.yygh.common.service.RabbitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@EnableScheduling
public class ScheduledTask {

    private RabbitService rabbitService;
    @Scheduled(cron = "* * 9 * * ?")
    public  void task1(){
        rabbitService.sendMessage(MqConst.EXCHANGE_DIRECT_TASK,MqConst.ROUTING_TASK_8,"");
    }
}
